<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>

<html>

 <head>
    <title>部门管理</title>
    <!-- import css and js -->
	<%@ include file="/common/meta.jsp" %>
		<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
	<script type="text/javascript">
		var basic_Url="${ctx}/security/department";
		var basic_WUrl="security/department";
		var basic_Title="部门管理";
		var show_Width=950;
		var show_Hight=450;
		function createSearch(){
			init(1,4,'140,140,140,140','25%');
			//第一行的数据
			addCommon(0,0,"lable","部门名称");
			addCommon(0,1,"txtlike","dep_name");
			addCommon(0,2,"lable","部门编码");
			addCommon(0,3,"txtlike","dep_code");
		}
		function searchAP(){			
			multipleSearch("#table1",true,"",basic_Url+"/list.do");
		}

		$(function(){
			//创建JQGRID表格
			var grid = $("#table1").ligerGrid({
		        columns: [
		                  { display: '部门名称', name: 'depname', width: 120 },
		                  { display: '部门编码', name: 'depcode', width: 120 },
		                  { display: '部门地址', name: 'address', width: 120 },
		                  { display: '部门性质', name: 'nature', width: 120 },
		                  { display: '责任人', name: 'personresponsible', width: 120 },
		                  { display: '电话', name: 'telephone', width: 120 },
		                  { display: '备注', name: 'remark', width: 120 },
		                  { display: '状态', name: 'removed', width: 120,
	                    	  render: function (item){
	                    		  var removed=item.removed;
	                    		  if(removed=="0"){
	                    			  return "正常";
	                    		  }
	                    		  if(removed=="1"){
	                    			  return "锁定";
	                    		  }
	                    	  }}
		                      ],  usePager: true,pageSize:30,
		                      url : basic_Url+"/list.do",
		                      width: '100%', height: '98%', checkbox: true,rownumbers:true,           
		                      onDblClickRow : function (data, rowindex, rowobj){
		                          edit(data);
		                       }
		                  });
			$("#pageloading").hide();
		});
	</script>
  </head>
<body onLoad="createSearch()">
   <div id="layout1">
      <div position="top">
          <div class="panelBar">
	           <ul class="toolBar">
	             
		           <li><a class="add" onclick="add()">
		           <span>添加</span></a></li>
				   <li><a class="delete" onclick="del()"><span>删除</span></a></li>
               </ul>
          </div>
          <div id="pageHeader" class="pageHeader">
               <div class="searchBar" id="multipleSearchDialog">
	                <table class="table" width="100%" id="searchHeader" >  
                        <tbody id="newbody">
                        </tbody>
 	                </table>
                    <div class="subBar">
			             <ul>
				             <li><div class="buttonActive"><div class="buttonContent"><button type="submit" id="btnSearch" onclick="searchAP()">查询</button></div></div></li>
				             <li><a class="button" onclick="clearSearch()"><span>重置</span></a></li>
			             </ul>
	                </div>
               </div>
          </div>
      </div>
      <div position="center" id="table1">
      </div>
      <div class="clear"></div>
   </div>
 
</body>
</html>